<?php /* @var $this Controller */ ?>
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
  <meta charset="utf-8" />
  <meta name="description" content="" />
  <meta name="author" content="" />
  <meta name="viewport" content="width=device-width,initial-scale=1" />
  <!-- blueprint CSS framework -->

  <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/css/all.css" type="text/css" />
  <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css" type="text/css" />

  <!--[if gte IE 9]>
  <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie9.css" type="text/css" />
  <![endif]-->

  <!--[if gte IE 8]>
  <link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie8.css" type="text/css" />
  <![endif]-->
<?php
    $baseUrl = Yii::app()->baseUrl;
    $cs = Yii::app()->getClientScript();
    Yii::app()->clientScript->registerCoreScript('jquery');
    Yii::app()->clientScript->registerCoreScript('jquery.ui');
    $cs->registerScriptFile($baseUrl . '/js/all.js');
    $cs->registerScriptFile($baseUrl . '/js/common.js');
    $cs->registerScriptFile($baseUrl . '/js/utils.js');
    ?>

  <script type="text/javascript">
    //<![CDATA[
      var baseUrl = '<?php echo Yii::app()->getBaseUrl(true); ?>';
    //]]>
  </script>
  <title><?php echo CHtml::encode($this->pageTitle); ?></title>
  <?php
    $cs->registerScriptFile(Yii::app()->baseUrl . '/js/underscore-min.js');
  ?>
</head>

<body>

<div id="wrapper">

  <div id="header">
    <h1 style="width: 90%;"><?php echo CHtml::link(Yii::t('main', 'header.title'),array('admin/site/index')); ?></h1>

    <a href="javascript:;" id="reveal-nav">
      <span class="reveal-bar"></span>
      <span class="reveal-bar"></span>
      <span class="reveal-bar"></span>
    </a>
  </div> <!-- #header -->

  <div id="sidebar">
    <ul id="mainNav">
      <?php if (Constants::isAdmin()) : ?>
      <li id="navDashboard" class="nav <?php echo ($this->activeMenu == Constants::MENU_MEMBERS ? ' active' : ''); ?>">
        <span class="icon-document-alt-stroke"></span>
        <?php echo CHtml::link("Member", array('/admin/members/list')); ?>
      </li>
      <li id="navDashboard" class="nav <?php echo ($this->activeMenu == Constants::MENU_ACCOUNTS ? ' active' : ''); ?>">
        <span class="icon-document-alt-stroke"></span>
        <?php echo CHtml::link("Account", array('/admin/accounts/list')); ?>
      </li>
      <?php endif; ?>
      <li id="navDashboard" class="nav <?php echo ($this->activeMenu == Constants::MENU_TRACKING ? ' active' : ''); ?>">
        <span class="icon-document-alt-stroke"></span>
        <?php echo CHtml::link("Tracking", array('/admin/accountTracking/list')); ?>
      </li>
      <li id="navDashboard" class="nav <?php echo ($this->activeMenu == Constants::MENU_SITES ? ' active' : ''); ?>">
        <span class="icon-document-alt-stroke"></span>
        <?php echo CHtml::link("Sites", array('/admin/sites/list')); ?>
      </li>
      <li id="navDashboard" class="nav <?php echo ($this->activeMenu == Constants::MENU_SITES ? ' active' : ''); ?>">
        <span class="icon-document-alt-stroke"></span>
        <?php echo CHtml::link("Answer", array('/admin/capcha/answer')); ?>
      </li>
    </ul>
  </div> <!-- #sidebar -->

  <div id="content">

    <div id="contentHeader">
      <h1><?php echo $this->contentHeader; ?></h1>
    </div> <!-- #contentHeader -->

    <div class="container">
      <?php echo $content; ?>

    </div> <!-- .container -->

  </div> <!-- #content -->

  <div id="topNav">
     <ul>
       <li><?php echo CHtml::link(sprintf(Yii::t('main', 'common.change_pass'), Yii::app()->user->name),array('members/update')); ?></li>
       <li><?php echo CHtml::link('Logout',array('/admin/site/logout')); ?></li>
     </ul>
  </div> <!-- #topNav -->
</div> <!-- #wrapper -->

<div id="footer">
    Copyright &copy; <?php echo date('Y'); ?> by crebird.com.<br/>
    All Rights Reserved.<br/>
</div>
</body>
</html>
